#include "ST_LOGO.h"
#include "Game/Game.h"
#include "Game/dConfig.h"
#include "Tools/Tools.h"
namespace LTGame{

	ST_LOGO::ST_LOGO(GST_FLAG flag)
		: GameState(flag)
	{
		commer_timer = 0;
		glClearColor(0xff, 0xff, 0xff, 0xff);
		img_logo = CCSprite::spriteWithFile("gui_pic/logo.png");
		img_logo->setPosition(CCPointHalfScreen);
		CCGame->addChild(img_logo);
	
	}

	ST_LOGO::~ST_LOGO(void)
	{
		CCGame->removeChild(img_logo, true);
	}

	bool ST_LOGO::logic()
	{
		
		if ( ++commer_timer > SHOW_TIME*FPS_RATE )
		{
			CCGame->SetState(GST_GameCG);
			return false;
		}	
		return true;
	}

}
